package com.ai.model.param;

import com.ai.common.vaild.AddGroup;
import com.ai.common.vaild.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.List;

@Data
public class SysRoleParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @NotBlank(message = "修改时Id不能为空",groups = {UpdateGroup.class})
    @Null(message = "新增时不可指定id",groups = {AddGroup.class})
    private String id;

    @ApiModelProperty("角色名")
    @NotBlank(message = "修改时角色名不能空",groups = {UpdateGroup.class})
    @NotBlank(message = "新增时角色名不能空",groups = {AddGroup.class})
    private String roleName;

    @ApiModelProperty("角色说明")
    private String roleDescription;

    @ApiModelProperty("权限id")
    private List<String> permissionIds;
}
